'''
Created on 16/09/2010

@author: lctr30
'''

import pygtk
pygtk.require('2.0')
import gtk


from pemba.gui.window import Window
from pemba.gui.table import Table
from pemba.gui.frame import Frame



class gui:
    def __init__(self):
        self.window = self.create_main_window()
        self.window.show()
        gtk.main()

    

    def create_main_window(self):
        w = Window()
        w.set_size(640, 480)
        w.set_title('Get ipod music')
        w.set_escape_destroy()
        t = Table()
        t.set_padding(5)
        t.attach_down(self.create_frame_location(),1,1)
        t.attach_down(self.create_frame_export(),1,1)
        t.attach_down(self.create_frame_album(),1,1)
        t.attach_down(self.create_buttons(),1,1)
        w.add(t)
        return w
        
        
    def create_frame_location(self):
        f = Frame(text='Ipod location: ',bold=True, xalign=0.0, yalign=0.5)
        f.add(gtk.Button('asdf'))
        return f
    
    def create_frame_export(self):
        f = Frame(text='Export directory: ',bold=True, xalign=0.0, yalign=0.5)
        return f
    
    def create_frame_album(self):
        f = Frame(text='Albums: ',bold=True, xalign=0.0, yalign=0.5)
        return f
    
    def create_buttons(self): 
        t = Table()
        t.attach_down(gtk.Button('uno'), 1, 1)
        t.attach_right(gtk.Button('dos'), 1, 1)
        t.attach_right(gtk.Button('tres'), 1, 1)
        return t

if __name__ == '__main__':
    g = gui()